﻿using System;
using System.IO.IsolatedStorage;
using DataBindApp1.ViewModel;
using Mandarine.MVVM.Command;
using Mandarine.MVVM.ViewModel;

namespace DataBindApp1.Command
{
    /// <summary>
    /// AppSettingsのロードするクラスを提供します
    /// </summary>
    public class AppSettingsLoadCommand : AppSettingsCommand<SettingsViewModel>
    {
        public AppSettingsLoadCommand()
            : base(null)
        {
            _execute = vm =>
            {
                vm.UseGeoLocation = GetValueOrDefault("UseGeoLocation", false);
                vm.UseCookie = GetValueOrDefault("UseCookie", true);
            };
        }
    }
}
